import request from "@/utils/request";
import { stringify } from "qs";

//6.1 快销退货
export async function getFmcgreturnList(params) {
	return request(`/new-wms/fmcgreturn/listPage`, {
		method: "post",
		data: params,
		loading: true
	})
}

// 指派退货员
export async function fmcgreturnAssignedReturnClerk(params) {
	return request(`/new-wms/fmcgreturn/assignedReturnClerk`, {
		method: "post",
		data: params,
		loading: true
	});
}

// 拿货员列表
export async function queryTakeUserList(params) {
	return request(`/blade-user/childUsers?${stringify(params)}`, { loading: true });
}

// 拿货指派
export async function fmcgpurchasesAppointReceivingClerk(params) {
	return request(`/new-wms/fmcgpurchases/appointReceivingClerk`, {
		method: "post",
		data: params,
		loading: true
	});
}

// 所属仓库
export async function queryBatchWarehouseList(params) {
	return request(`/zjf-wms/client/kx/warehouse/queryBatchWarehouseList?${stringify(params)}`);
}

//退货状态枚举
export async function getReturnStatus(params) {
	return request(`/new-wms/fmcgreturn/returnStatus?${stringify(params)}`);
}

//退货方式枚举
export async function getReturnMethods(params) {
	return request(`/new-wms/fmcgreturn/returnMethods?${stringify(params)}`);
}

//拒退类型枚举
export async function getRefusalTypes(params) {
	return request(`/new-wms/fmcgreturn/refusalTypes?${stringify(params)}`);
}
// 保存打印记录
export async function saveCodePrintTask(params) {
	return request(`/new-oms-ec/printTask/saveCodePrintTask`, {
		method: "post",
		data: params,
	});
}

//获取快麦唯一码打印数据
export async function getKuaiMaiPrint(params) {
	return request(`/new-wms/kuaimai/getKuaiMaiCodePrintList`, {
		method: "post",
		data: params,
	});
}

//区域编码模糊查询
export async function queryAreaCode(params) {
	return request(`/zjf-wms/storecodesort/selectListByName?${stringify(params)}`);
}

//继续退供
export async function reassignReturnClerk(params) {
	return request(`/new-wms/fmcgreturn/reassignReturnClerk`, {
		method: "post",
		data: params,
	});
}

//退货转入仓
export async function returnWarehousing(params) {
	return request(`/new-wms/fmcgreturn/returnWarehousing`, {
		method: "post",
		data: params,
	});
}

//用户仓库下拉列表
export async function getWarehouseList(params={}) {
	return request(`/new-wms/inventory/warehouse-list`, {
		method: "post",
		data: params,
	});
}

